//tag::include[]
package org.hibernate.validator.referenceguide.chapter02.objectgraph;

//end::include[]

import jakarta.validation.constraints.NotNull;

//tag::include[]
public class Person {

	@NotNull(message = "姓名不能为空！")
	private String name;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	//...
}
//end::include[]
